 function getWeek(i) {
	var now = new Date();
	var n = now.getDay();
	var start = new Date();
	start.setDate(now.getDate() - n + i); //取得一周内的第一天、第二天、第三天...
	return start;
}
 function getDays() {
	let _this = this;
	var days = new Array();
	for (var i = 1; i <= 7; i++) {
		days[i - 1] =getWeek(i);
	}
	return days;
}
export function initDate() {
	let _this = this;
	let aryDay = new Array("日", "一", "二", "三", "四", "五", "六");
	let currDT = new Date();
	let dw = currDT.getDay(); //从Date对象返回一周中的某一天(0~6)
	let tdDT; //日期
	let arr=[]

	//在表格中显示一周的日期

	for (var i = 0; i < 7; i++) {
		tdDT = getDays()[i];
		dw = tdDT.getDay(); //星期几
		
		if (tdDT.toLocaleDateString() == currDT.toLocaleDateString()) {
			arr.push({
				day:tdDT.getDate(),
				week:aryDay[dw],
				tag:'today'
			})
		}else{
			arr.push({
				day:tdDT.getDate(),
				week:aryDay[dw]
				
			})
		}
		 
		// console.log(tdDT.getDate())
		// console.log(aryDay[dw])
	}
	console.log(arr)
	return arr

}
